#include "util.h"
#include "imgserver.h"

namespace ImgUpload
{
    static int carid = 0, vioid = 0;
    vector<imgServer> CarImgServer;
    vector<imgServer> VioImgServer;

    imgServer* GetServer(bool vio) {
        if(vio) {
            if(vioid >= VioImgServer.size())
                vioid = 0;
            return &VioImgServer[vioid++];
        } else {
            if(carid >= CarImgServer.size())
                carid = 0;
            return &CarImgServer[carid++];
        }
        return NULL;
    }
}